//
//  MGNavView.m
//  SanYiTeaching
//
//  Created by 李文强 on 2019/5/3.
//  Copyright © 2019 SanYi. All rights reserved.
//

#import "MGNavView.h"

@implementation MGNavView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (void)initOption{
    [self addSubview:self.submitAuditButton];
    [_submitAuditButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(@0).offset(-10);
        make.centerY.equalTo(self.mas_centerY);
        make.width.equalTo(@60);
        make.height.equalTo(@20);
    }];
}
- (UIButton *)submitAuditButton{
    if (!_submitAuditButton) {
        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
        [button setTitle:@"添加" forState:UIControlStateNormal];
        button.titleLabel.font = [UIFont systemFontOfSize:12];
        [button setTitleColor:SELECTEDCOLOR forState:0];
        [button addTarget:self action:@selector(submitAuditButtonClick:) forControlEvents:UIControlEventTouchUpInside];
        _submitAuditButton = button;
    }
    return _submitAuditButton;
}
- (void)submitAuditButtonClick:(UIButton *)sender{
    [self.delegate submiteClick];
}
@end
